﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="list_users.aspx.cs" Inherits="users_list_users" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="ajaxToolkit" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>List users</title>
    <link href="../styles/style.css" rel="stylesheet" type="text/css" />
   <link type="text/css" href="../css/smoothness/jquery-ui-1.8.11.custom.css" rel="stylesheet" />
   <script src="../js/jquery-1.5.min.js" type="text/javascript"></script>
   <script src="../js/jquery-ui-1.8.9.custom.min.js" type="text/javascript"></script>
</head>
<body>
      <form id="form1" runat="server">

    <div class="wrapper">
       <div id="header">
		<h1 class="logo">
        <a href="index.aspx">
        	<img src="../images/logo.png" width="280" height="46" border="0" /></a>
        
        </h1>
        <div class="login_zone" >
            Username:<asp:Literal ID="lUsername" Text="" runat="server" />
            <br />
             <asp:LinkButton ID="lnkLogout" runat="server" Text="Logout" 
                    onclick="lnkLogout_Click" /> | <a href="login/change_pass.aspx">Change password</a>
            </div>
        </div>
     <div class="clear"></div>
     <div id="nav">
      <div style="margin-bottom:20px;width:210px;float:left;">
              <ul class="breadcrumb">
        <li>
            <a href="../index.aspx" title="Home">
         
                 <img src="../images/home.png" width="24" height="23" border="0" align="left" style="margin-top:2px;" class="home" />
      
            </a>
              
            </li>
            <li>
            <a href="../index.aspx"   title="homepage">
                Homepage
                </a>
            </li>
        <li>
            
                List users
            
       </li>
       
     </ul>
     </div>

        </div>
              <div class="clear"></div>
        <div class="main_content">
            <div style="margin-top:-8px;">
                <img src="../images/list_users.jpg" width="900" height="77" border="0" />
            </div>
               <br />
                                
                  <ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
                  </ajaxToolkit:ToolkitScriptManager>
                                
                  <br />
                <table width="94%" align="center">
                                    
                    <tr>
                        <td align="left">Fullname:</td>
                        
                        
                        <td align="left"><strong>
                            <asp:TextBox ID="txtFullname" runat="server" CssClass="box" Width="313px"></asp:TextBox>
                            </strong></td>
                        
                        
                    </tr>
                
                
                    <tr>
                        <td align="left">Username:</td>
                        
                        
                        <td align="left">
                            <strong>
                            <asp:TextBox ID="txtUserName" runat="server" CssClass="box" Width="313px"></asp:TextBox>
                            </strong></td>
                        
                        
                    </tr>
                
                
                    <tr>
                        <td align="left">Email:</td>
                        
                        
                        <td align="left">
                            <strong>
                            <asp:TextBox ID="txtEmail" runat="server" CssClass="box" Width="313px"></asp:TextBox>
                            </strong></td>
                        
                        
                    </tr>
                
                
                    <tr>
                        <td align="left">Active:</td>
                        
                        
                        <td align="left">
                            <asp:CheckBox ID="chkActive" runat="server"/>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
                            <asp:Button ID="btnAdd" runat="server" CssClass="button white" 
                                Text="Add" Width="80px" onclick="btnAdd_Click" />
                        </td>
                        
                        
                    </tr>
                
                
                    </table>
              <div style="clear:both;">
              <br /><br />
                <asp:GridView ID="gdUsers" runat="server" AllowPaging="True" AutoGenerateColumns="False"                    
                  
                   CssClass="border_grid" HorizontalAlign="Center" 
                     
                      Width="94%" onrowcommand="gdUsers_RowCommand" 
                      onrowdeleting="gdUsers_RowDeleting">
                   <PagerStyle CssClass="grid_footer_pager" />
                   <Columns>
           
                       <asp:TemplateField HeaderText="No">
                           <HeaderStyle CssClass="header_grid" />
                           <ItemTemplate>
                                   <%#Container.DataItemIndex + 1%>
                               
                           </ItemTemplate> 
                       </asp:TemplateField>
   
                       
                       <asp:TemplateField HeaderText="id">
                             <HeaderStyle CssClass="header_grid" />
                           <ItemTemplate>
                                   <%#Eval("id")%>
                               
                           </ItemTemplate> 
                       </asp:TemplateField>
   
                       
                       <asp:TemplateField HeaderText="Group">
                       <HeaderStyle CssClass="header_grid" />
                               <ItemTemplate></ItemTemplate>
                           <ItemStyle HorizontalAlign="Center" />
                        
                       </asp:TemplateField>
                       
                       <asp:TemplateField HeaderText="Fullname">
                           <HeaderStyle CssClass="header_grid" />
                           <ItemTemplate><%#Eval("fullname")%></ItemTemplate>
                           <ItemStyle HorizontalAlign="Left" />
                       </asp:TemplateField>
                       <asp:TemplateField HeaderText="Username">
                           <HeaderStyle CssClass="header_grid" />
                           
                            <ItemTemplate><%#Eval("username")%></ItemTemplate>
                       </asp:TemplateField>
                       <asp:BoundField DataField="date_created" DataFormatString="{0:dd-MM-yyyy}" 
                           HeaderText="Date Created" >
                       <HeaderStyle CssClass="header_grid" />
                       </asp:BoundField>
                          
                       <asp:TemplateField HeaderText="Status">
                       <HeaderStyle CssClass="header_grid" />
                          <ItemTemplate>
                                <asp:LinkButton ID="lnkActive" 
                                CommandArgument='<%#Eval("id")%>'
                                CommandName="Update" runat="server" Text='<%#Eval("status") %>'>
                                    
                                </asp:LinkButton>
                              
                           </ItemTemplate>
                           <ItemStyle HorizontalAlign="Center" />
                       </asp:TemplateField>
                       
                       <asp:TemplateField HeaderText="Action">
                           <HeaderStyle CssClass="header_grid" />
                             <ItemTemplate>                             
                              
                               <asp:LinkButton ID="lnkButtonDelete" CommandArgument='<%#Eval("id")%>' CommandName="Delete" runat="server">
                                  Delete
                               </asp:LinkButton>
                              
                          </ItemTemplate>
                           <ItemStyle HorizontalAlign="Center" />
                       </asp:TemplateField>
                       
                   </Columns>
                   <FooterStyle HorizontalAlign="Right" BackColor="DarkGray" BorderColor="DarkGray" 
                        BorderStyle="Solid" BorderWidth="1px" />
                
                   <PagerStyle HorizontalAlign="Center" VerticalAlign="Middle" />
               </asp:GridView>
               </p>
              </div>
           <uc:OkMessageBox ID="mpOKMsg" runat="server" /> 
        </div>
        <div id="footer" style="float:right;">
        	<p>
            	IT Dev 2011<br />
                Version beta
                
                
            </p>
        
        </div>
        
	</div>    
    </form>
</body>
</html>
